﻿using SD.Infrastructure.EntityBase;
using System;

namespace SlamDunk.MES.Domain.Entities.ExecutionContext
{
    /// <summary>
    /// 工单实际设备
    /// </summary>
    public class WorkOrderActualEquipment : PlainEntity
    {
        #region # 构造器

        #region 00.无参构造器
        /// <summary>
        /// 无参构造器
        /// </summary>
        protected WorkOrderActualEquipment() { }
        #endregion

        #region 01.创建工单实际设备构造器
        /// <summary>
        /// 创建工单实际设备构造器
        /// </summary>
        /// <param name="equipmentId">设备Id</param>
        /// <param name="equipmentUse">设备用途</param>
        /// <param name="actualStartTime">实际开始时间</param>
        /// <param name="actualEndTime">实际结束时间</param>
        /// <param name="sort">排序</param>
        /// <param name="description">描述</param>
        public WorkOrderActualEquipment(Guid equipmentId, string equipmentUse, DateTime actualStartTime, DateTime actualEndTime, int sort, string description)
            : this()
        {
            this.EquipmentId = equipmentId;
            this.EquipmentUse = equipmentUse;
            this.ActualStartTime = actualStartTime;
            this.ActualEndTime = actualEndTime;
            this.Sort = sort;
            this.Description = description;
        }
        #endregion

        #endregion

        #region # 属性

        #region 设备Id —— Guid EquipmentId
        /// <summary>
        /// 设备Id
        /// </summary>
        public Guid EquipmentId { get; private set; }
        #endregion

        #region 设备用途 —— string EquipmentUse
        /// <summary>
        /// 设备用途
        /// </summary>
        public string EquipmentUse { get; private set; }
        #endregion

        #region 实际开始时间 —— DateTime ActualStartTime
        /// <summary>
        /// 实际开始时间
        /// </summary>
        public DateTime ActualStartTime { get; private set; }
        #endregion

        #region 实际结束时间 —— DateTime ActualEndTime
        /// <summary>
        /// 实际结束时间
        /// </summary>
        public DateTime ActualEndTime { get; private set; }
        #endregion

        #region 排序 —— int Sort
        /// <summary>
        /// 排序
        /// </summary>
        public int Sort { get; private set; }
        #endregion

        #region 描述 —— string Description
        /// <summary>
        /// 描述
        /// </summary>
        public string Description { get; private set; }
        #endregion

        #region 导航属性 - 工单 —— WorkOrder WorkOrder
        /// <summary>
        /// 导航属性 - 工单
        /// </summary>
        public virtual WorkOrder WorkOrder { get; internal set; }
        #endregion

        #endregion
    }
}
